#include <iostream>
using namespace std;
int rango (int n1, int n2);
int main ()
{
    int n1, n2;
    cin>>n1;
    cin>>n2;
    cout<<rango (n1, n2);
    return 1;
}
int rango(int n1, int n2)
{
    int suma=0;
    while (n1<n2)
    {
        suma=suma+n1;
        n1++;
    }
    return suma;
}
